﻿using System;
using System.ComponentModel;
using System.Xml.Serialization;

namespace Microsoft.WowAddonStudio.FrameXml.Serialization.LayoutFrames
{
    [Serializable]
    [DesignerCategory("code")]
    [XmlType(Namespace = "http://www.blizzard.com/wow/ui/")]
    [XmlRoot(Namespace = "http://www.blizzard.com/wow/ui/", IsNullable = false)]
    public class Minimap : Frame
    {
        /// <summary>
        /// Gets or sets the arrow model for the minimap.
        /// </summary>
        [XmlAttribute("minimapArrowModel")]
        [Category("Behavior")]
        [Description("Defines the arrow model for the minimap.")]
        public string ArrowModel
        {
            get { return Properties.GetValue<string>("ArrowModel"); }
            set { Properties.SetValue("ArrowModel", value); }
        }

        /// <summary>
        /// Gets or sets the player model for the minimap.
        /// </summary>
        [XmlAttribute("minimapPlayerModel")]
        [Category("Behavior")]
        [Description("Defines the player model for the minimap.")]
        public string PlayerModel
        {
            get { return Properties.GetValue<string>("PlayerModel"); }
            set { Properties.SetValue("PlayerModel", value); }
        }

        /// <summary>
        /// Gets a value indicating whether a serialization object is complete and can be rendered.
        /// </summary>
        public override bool IsComplete
        {
            get
            {
                return ArrowModel != null && PlayerModel != null;
            }
        }
    }
}